﻿//# sourceURL=wisej.web.ext.Syncfusion2Widget.AccumulationChart.js

///////////////////////////////////////////////////////////////////////////////
//
// (C) 2020 ICE TEA GROUP LLC - ALL RIGHTS RESERVED
//
// 
//
// ALL INFORMATION CONTAINED HEREIN IS, AND REMAINS
// THE PROPERTY OF ICE TEA GROUP LLC AND ITS SUPPLIERS, IF ANY.
// THE INTELLECTUAL PROPERTY AND TECHNICAL CONCEPTS CONTAINED
// HEREIN ARE PROPRIETARY TO ICE TEA GROUP LLC AND ITS SUPPLIERS
// AND MAY BE COVERED BY U.S. AND FOREIGN PATENTS, PATENT IN PROCESS, AND
// ARE PROTECTED BY TRADE SECRET OR COPYRIGHT LAW.
//
// DISSEMINATION OF THIS INFORMATION OR REPRODUCTION OF THIS MATERIAL
// IS STRICTLY FORBIDDEN UNLESS PRIOR WRITTEN PERMISSION IS OBTAINED
// FROM ICE TEA GROUP LLC.
//
///////////////////////////////////////////////////////////////////////////////

/**
 * Performs additional widget configuration.
 * @param {any} args
 */
this.filterOptions = function (args) {

	if (wisej.web.DesignMode) {
		if (args.series) {
			for (var i = 0; i < args.series.length; i++) {
				var entry = args.series[i];
				entry.animation = {
					delay: 0,
					duration: 0,
					enable: false
				};
			}
		}
		args.enableAnimation = false;
	}
}

// Returns a data map that can be converted to JSON.
this.filterEventData = function (args) {

	switch (args.name) {

		case "pointClick":
			return {
				pointIndex: args.pointIndex,
				seriesIndex: args.seriesIndex
			};

		case "chartMouseUp":
		case "chartMouseMove":
		case "chartMouseDown":
		case "chartMouseLeave":
		case "chartMouseClick":

			var components = args.target.split("_");
			var point = components[components.indexOf("Point") + 1];
			var series = components[components.indexOf("Series") + 1];

			return {
				x: args.x,
				y: args.y,
				pointIndex: point,
				seriesIndex: series
			};

		default:
			break;
	}
}
